<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="search.aspx.vb" Inherits="search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<meta name="keywords" content="songs, lyrics, chords, bands, guitar, music, artists" />
<meta name="description" content="YobboGuitar: songs, lyrics and chords for all" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Author" content="Dr Martin Moxham" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   <h1>Search for Song</h1>
    <p>
        <asp:Label ID="Label_bands" runat="server" AssociatedControlID="DropDownList_bands">Select band:</asp:Label></p>
    <p>
        <asp:DropDownList ID="DropDownList_bands" runat="server" Width="400px">
            <asp:ListItem Value="-1" Selected="True">-any-</asp:ListItem>
        </asp:DropDownList>
    </p>
    <p>
        <asp:Label ID="Label_genres" runat="server"  AssociatedControlID="DropDownList_genres">Select genre:</asp:Label></p>
     <p>
        <asp:DropDownList ID="DropDownList_genres" runat="server" Width="400px">
            <asp:ListItem Value="-1" Selected="True">-any-</asp:ListItem>
        </asp:DropDownList>
    </p>
    <p>
        <asp:Label ID="Label_sortBy" runat="server"  AssociatedControlID="DropDownList_sortBy">Sort by</asp:Label></p>
     <p>
        <asp:DropDownList ID="DropDownList_sortBy" runat="server" Width="400px">
            <asp:ListItem Value="title" Selected="True">title</asp:ListItem>
            <asp:ListItem Value="bandName" >artist</asp:ListItem>
            <asp:ListItem Value="genreName" >genre</asp:ListItem>
             <asp:ListItem Value="roundedRating" >rating</asp:ListItem>
        </asp:DropDownList>
    </p>
    <p>
        <asp:Label ID="Label_words" runat="server" AssociatedControlID="TextBox_words">Search for: (leave blank for all)</asp:Label></p>
    <p>
        <asp:TextBox ID="TextBox_words" runat="server" Width="400px"></asp:TextBox></p>
    <p>
        <asp:RadioButtonList ID="RadioButtonList_phraseOrWords" runat="server" Width="400px">
            <asp:ListItem Value="phrase" Selected="True">Phrase</asp:ListItem>
            <asp:ListItem Value="words">Individual words</asp:ListItem>
        </asp:RadioButtonList>
    </p>
    <p>
        <asp:Button ID="Button_search" runat="server" Text="Search" /></p>
    <div runat="server" id="div_results">
        <asp:GridView ID="GridView_results"  AutoGenerateColumns="false" runat="server" BorderStyle="None" CellPadding="5" CellSpacing="5" BorderColor="White" BorderWidth="0" HeaderStyle-BorderStyle="None" AlternatingRowStyle-BorderStyle="None" >
            <Columns>
                <asp:HyperLinkField HeaderText="Song Title" DataTextField="title" DataNavigateUrlFields="ID"
                    DataNavigateUrlFormatString="~\displaySong.aspx?ID={0}"  ControlStyle-BorderStyle="None" ItemStyle-BorderStyle="None"  HeaderStyle-BorderStyle="None" HeaderStyle-HorizontalAlign="Left" />
                <asp:BoundField HeaderText="Artist" DataField="bandName" ControlStyle-BorderStyle="None" ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None" HeaderStyle-HorizontalAlign="Left"/>
                <asp:BoundField HeaderText="Genre" DataField="genreName" ControlStyle-BorderStyle="None" ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None" HeaderStyle-HorizontalAlign="Left"/>
                <asp:ImageField HeaderText="Rating"  DataImageUrlField="roundedRating" DataImageUrlFormatString="~\images\{0}star.png" ControlStyle-BorderStyle="None" ItemStyle-BorderStyle="None"  HeaderStyle-BorderStyle="None" HeaderStyle-HorizontalAlign="Left"/>
            </Columns>
        </asp:GridView>
        <div runat="server" id="div_noResults" visible="false">
        <p>Sorry... your search did not yield any results. Why not search again, or 
            <asp:LinkButton ID="LinkButton_tagging" runat="server" >browse tags</asp:LinkButton> &nbsp;to find something 
            else of interest to you?</p>
        </div>
    </div>
</asp:Content>
